﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        
        Session["1"] = TextBox1.Text.ToString();
        Response.Redirect("Default2.aspx");
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        HttpCookie cookName = new HttpCookie("Cookie1");
        cookName.Value = TextBox1.Text;
        Response.Cookies.Add(cookName);
        Response.Redirect("Default2.aspx");
    }
    protected void Button3_Click(object sender, EventArgs e)
    {
        Application["app1"] = TextBox1.Text.ToString();
        Response.Redirect("Default2.aspx");
    }
    protected void Button4_Click(object sender, EventArgs e)
    {
        Server.Transfer("Default2.aspx?server1=" + TextBox1.Text , true);
    }
    protected void Button5_Click(object sender, EventArgs e)
    {
        Response.Redirect("Default2.aspx?Query1=" + TextBox1.Text);
    }
}